"Region mapping" panel

Once regions have been created, this panel lets the user create various maps and contour plots to help analyse the features present. Remember the display of the FITS file can be toggled with the "Show FITS file" button in the "Files" panel, which can make it much easier to show the generated maps.

NOTE : When you create a map, it will only be visible in the current viewing mode you're in (3D or 2D). For example, suppose you create a flux map for a region in 3D mode. When you switch to 2D it will no longer be visible. If you create a new map in 2D mode, the 3D one will be deleted.
The upshot of this is that it's best to create maps only using one viewing mode, and you can't yet have independent maps in each mode.

NOTE 2 : By default, creating a map will toggle wireframe display of the selected region(s) so the map will be visible. Toggling the display of the FITS files and a few other operations may reset this to solid display mode. If regions aren't visible and you think they should be, try using the "wire" option in the "Region setup" panel.

The top row of numerical values set parameters for the maps. From left to right, they set :
- The minimum value to display
- The increment for any contours to display (ignored for non-contour maps)
- The maximum value to display
- The thickness to use when rendering contours (can be updated after contours are generated, if they are selected first); also serves as the minimum opacity level when generating multiple isosurface levels - see below
At the end, a toggle button enables using a geometric progression for contours or equivalently a logarithmic colour transfer function for maps. By default this is inactive and linear scales will be used. When active, the contour increment is treated as a multiplier. E.g. If the user specifies a minimum value of 2.0, a step of 3.0 and a maximum of 50, the contours generated will be at the levels : 2, 6, 18.


NOTE : If a linear progression is used, the minimum and maximum levels INCLUSIVE will be calculated, e.g. contours specified from 1.0 to 3.0 in steps of 1.0 will show levels corresponding to 1.0, 2.0, 3.0. 
On the other hand, if a geometric progression is used, the maximum level will NOT necessarily be shown. E.g. if the contours are specified to be from 1.0 to 3.0 with a multiplicative step of 10.0, they will only be calculated for the value of 1.0, since the next value (10.0) is beyond the specified maximum. This is useful as the display behaviour of isosurfaces is controlled differently when only a single level is calculated. 

NOTE : Because contours and isosurfaces used vertices, the more complex the contour, the more vertices are required. This can cause enormous slowdowns and memory issues if the contours are too complex. By default FRELLED imposes a limit of 500,000 vertices per contour. If any contours exceed this then they will not be generated, and FRELLED will then move to the next contour in the sequence and continue attempting to plot them. Warning messages are printed to the terminal if any contours are skipped.
The vertex limit can be changed or eliminated completely in the Developer tab -> "Contour control" panel. On the development machine, a 500,000 vertex isosurface take about 40 seconds to generate, whereas 100,000 takes ~5 seconds.

The "Map data scaling" toggles the numerical values for the contours and maps, between using actual values of the data (e.g. flux) or whether the user's entries refer to the normalised values within the region. E.g a minimum value of 0.1 would now correspond to 10% of the peak value in that region or map.

The "Map display" button toggles the selected map between transparent and opaque. By default these are opaque, which are brighter. Transparent maps mean you can see multiple maps at once, e.g. overlay flux and SDSS images.
This toggle affects maps being generated and those which are currently selected (the map object itself must be selected, using the "Select" button in the "Operations" section described below).

"Map type and colours" section - from left to right :
1) Drop-down menu of the map type to produce. Options are :
- Integrated flux map (moment 0)
- Velocity map (moment 1)
- Velocity dispersion map (moment 2)
- Integrated flux contours : moment 0 but contours instead of a map
- Renzogram : contours at a fixed flux level, one per channel (uses the minimum value), coloured according to the velocity
- Isosurfaces : surfaces at a constant flux level. As with the FITS data itself, visibility can be controlled using the "Clip Alpha" slider in the "Loading and display controls" panel of the Display tab. 
Opacity of isosurfaces depends on how many levels are generated. If multiple levels are generated, then the lowest data value is given an opacity value of the contour thickness parameter, with the rest scaled linearly up to a maximum of 1.0.
If only a single isosurface is generated, then the "Opacity" slider (FITS Display tab -> Loading and display controls panel) will control the transparency interactively, and the colour box will set the colour (use the "Apply all changes" button in the "Help and changes" panel for this to take effect). Note that due to the special material isosurfaces use, they need a minimum opacity level of 0.12 to be visible in the realtime 3D viewport.
Isosurfaces look ugly in the realtime view, but much nicer in the fully rendered view. See the animation panel help files for more information.
- SDSS RGB : downloads the SDSS RGB images for the field of view of the specified region
- Axes : plot axes around the selected region, useful for making figures
2) Drop-down menu of the colour scheme to use for the map or contours
3) Velocity range to use when computing renzograms or integrated flux contours. Options are :
- Global : colours are defined by their velocity within the whole data range
- Local : colours are set based on the position in velocity within the selected region
- Selected : colours are set based on the position in velocity over the range of all the selected regions
Renzograms are quite straightforward : one contour per channel, coloured as described above. 
Integrated flux contours are each coloured according to the systemic (central) velocity of each selected region, with their fractional position computed as described above.
4) Colour picker : when using the special "solid" colour scheme, uses a fixed specified colour.

"Operations" :
- "Generate" produces the specified map or contour plot. Note that these are generated as Blender-internal objects, which the user can select and manipulate as they would regions.
- "Select" allows the user to select the chosen maps (as specified in the drop-down menu) for the selected regions, unselecting the region itself. Note that to adjust contour thickness after they have been generated, the contours (integrated flux, peak flux, renzograms) must be themeselves selected.
- "Delete" deletes the specified map. In this case the region must be selected, not the map itself. 

"Toggle maps" is a series of toggle buttons to allow the display of all the various possible maps. When the user generates any, the relevant toggle is automatically activated. Note that "Annotations" and "Cameras" refer to components generated in the Figures tab.
Some maps can hide each other. To ensure the desired map is visible, disable all of the other toggles. Also, some maps (peak flux and integrated flux; peak flux contours and integrated flux contours) share the same layer for visibility, so if both exist, both will be shown together. Unfortunately you'll have to delete one to see the other.
"Point clouds" enables the display of the vertices computed when running the SumFlux task described below.

"Sum flux" : these buttons attempt to calculate the total flux present within a specified region and apply beam corrections to the result. All results are printed to the terminal.
- "Cubes" is a fast, reliable estimation which is 100% accurate provided the region is a regular non-rotated cuboid.
- "Arbitrary" is a semi-experimental method that computes the flux within arbitrary volumes, e.g. cones, spheres, monkeys, whatever. This slower method generates and displays a vertex point cloud representing the data used in the summation. The user can edit this manually (beyond the scope of this guide) and use the "recalculate" button to update the result.